﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CourseManager.Model.Data
{
	public class LogDAO
	{

		public static void add(string _ip, string _action, DateTime _time)
		{
			 add("Unknown", _ip, _action, _time);
		}

		public static void add(string _userId, string _ip, string _action, DateTime _time)
		{
			DBEntity ent = new DBEntity();
			ent.AddToTab_Log(new Tab_Log
			                 	{
			                 		userId = _userId,
			                 		action = _action,
			                 		ip = _ip,
			                 		time = _time
			                 	});
			ent.SaveChanges();
		}
	}
}